home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / ksslconnectioninfo.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-10-10  |  2.3 KB  |  96 lines

  1. /* This file is part of the KDE project
  2.  *
  3.  * Copyright (C) 2000-2003 George Staikos <staikos@kde.org>
  4.  *
  5.  * This library is free software; you can redistribute it and/or
  6.  * modify it under the terms of the GNU Library General Public
  7.  * License as published by the Free Software Foundation; either
  8.  * version 2 of the License, or (at your option) any later version.
  9.  *
  10.  * This library is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.  * Library General Public License for more details.
  14.  *
  15.  * You should have received a copy of the GNU Library General Public License
  16.  * along with this library; see the file COPYING.LIB.  If not, write to
  17.  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  18.  * Boston, MA 02110-1301, USA.
  19.  */
  20.  
  21. #ifndef _KSSLCONNECTIONINFO_H
  22. #define _KSSLCONNECTIONINFO_H
  23.  
  24. #include <qstring.h>
  25.  
  26. #include <kdelibs_export.h>
  27.  
  28. class KSSL;
  29.  
  30. /**
  31.  * KDE SSL Connection Information
  32.  *
  33.  * This class contains the information about an SSL connection.  It is
  34.  * generally referenced through KSSL.
  35.  *
  36.  * @author George Staikos <staikos@kde.org>
  37.  * @see KSSL
  38.  * @short KDE SSL Connection Information
  39.  */
  40. class KIO_EXPORT KSSLConnectionInfo {
  41. friend class KSSL;
  42. public:
  43.     /**
  44.      *  Destroy this object.
  45.      */
  46.     ~KSSLConnectionInfo();
  47.  
  48.     /**
  49.      *  Get the cipher in use.
  50.      *  @return the cipher in use
  51.      */
  52.     const QString& getCipher() const;
  53.  
  54.     /**
  55.      *  Describe the cipher in use.
  56.      *  @return the cipher description (from OpenSSL)
  57.      */
  58.     const QString& getCipherDescription() const;
  59.  
  60.     /**
  61.      *  Get the version of the cipher in use.
  62.      *  @return the version of the cipher
  63.      */
  64.     const QString& getCipherVersion() const;
  65.  
  66.     /**
  67.      *  Get the number of bits of the cipher that are actually used.
  68.      *  @return the number of bits in use
  69.      */
  70.     int getCipherUsedBits() const;
  71.  
  72.     /**
  73.      *  Get bit-size of the cipher
  74.      *  @return the number of bits
  75.      */
  76.     int getCipherBits() const;
  77.  
  78. protected:
  79.     KSSLConnectionInfo();
  80.     void clean();
  81.  
  82.     // These are here so KSSL can access them directly
  83.     // It's just as easy as making accessors - they're friends afterall!
  84.     int m_iCipherUsedBits, m_iCipherBits;
  85.     QString m_cipherName;
  86.     QString m_cipherDescription;
  87.     QString m_cipherVersion;
  88.  
  89. private:
  90.     class KSSLConnectionInfoPrivate;
  91.     KSSLConnectionInfoPrivate *d;
  92. };
  93.  
  94. #endif
  95.  
  96.